<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="com.dinner.model.Seller"%>
<%@page import="com.dinner.model.Order"%>
<%@page import="com.dinner.model.MenuType"%>
<%@page import="java.util.List"%>
<%@page import="com.dinner.util.PageHelper" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
	List<MenuType> l = (List<MenuType>) request.getSession()
			.getAttribute("MenuTypeList");
	String name = "";
	Seller s = (Seller) request.getSession().getAttribute("user");
	String b = "";
	if (request.getAttribute("MenuTypeFail") != null)
		b = "添加失败，您已有该类别！";
	if (s != null)
		name = s.getSellerID();
	String message1 = "";
	String message2 = "";
	String todo1 = "menuItemManagement.do?menuType=";
	String todo2 = "modifyMenuType.jsp?height=200&width=300&menuType=";
	String todoN = "order.jsp?";
	if (l != null) {
		for (MenuType m : l) {
			message1 += "<tr><td height=\"25\" background=\"../images/left_tb_bg.jpg\" width=\"25\"></td>"
					+ "<td background=\"../images/left_tb_bg.jpg\" align=\"left\" width=\"160\">"
					+ "<a href=\""
					+ todo1
					+ m.getMenuType()
					+ "\">"
					+ m.getDescription() + "</a>" + "</td></tr>";
		}
	}
	List<Order> i = (List<Order>) request.getAttribute("OrderList");
	if (i != null) {
		for (Order m : i) {
			String temp = todoN + "orderId="+m.getOrderID()+"&menuName="+m.getMenuItemName()+"&sellerId="+m.getSellerID()+"&consumerId="+m.getConsumerID()+"&orderTime="+m.getOrderTime()+"&orderAddress="+m.getOrderAddress()+"&orderPhone="+m.getOrderPhone()+"&orderAmount="+m.getServeCount()+ "&height=380&width=330";
			temp = temp.replaceAll(" ", "%25");
			message2 += "<tr align=\"center\" class=\"SPJiFen STYLE4\">"
					+ "<td height=\"30\"></td><td>"
					+ m.getMenuItemName()
					+ "</td><td>"
					+ m.getServeCount()
					+ "</td><td>"
					+ m.getTotalPrice()
					+ " ￥</td><td><table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">"
					+ "<tbody><tr><td height=\"16\" width=\"3\"><img height=\"16\" width=\"3\" src=\"../images/actionbutton_left.gif\" />"
					+ "</td><td background=\"../images/actionbutton_middle.gif\"><img height=\"1\" width=\"5\" src=\"/elearning/img/spacer.gif\" />"
					+ "</td><td nowrap=\"nowrap\" valign=\"middle\" background=\"../images/actionbutton_middle.gif\">"
					+ "<a class=\"thickbox\" href=\""
					+ temp
					+ "\">参看信息</a></td>"
					+ "<td background=\"../images/actionbutton_middle.gif\"><img height=\"1\" width=\"5\" src=\"/elearning/img/spacer.gif\" />"
					+ "</td><td width=\"3\"><img height=\"16\" width=\"3\" src=\"../images/actionbutton_right.gif\" />"
					+ "</td></tr></tbody></table>" + "</td></tr>";
		}
	}
%>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
		<link rel="shortcut icon" href="/favicon.ico" />
		<link rel="Bookmark" href="/favicon.ico" />
		<title>51Dinner</title>
		<link href="../css/all.css" rel="stylesheet" type="text/css" />
		<link href="../css/thickbox.css" rel="stylesheet" type="text/css" />
		<script src="../js/main.js" type="text/javascript"></script>
		<script src="../js/net.js" type="text/javascript"></script>
		<script src="../js/jquery-1.2.6.js" type="text/javascript"></script>
		<script src="../js/thickbox.js" type="text/javascript"></script>
		<style type="text/css">
<!--
#toubiao {
	BORDER-BOTTOM: #ddd 1px solid;
	BORDER-top: #F0F0F0 1px solid;
	margin-bottom: 5px;
}

.STYLE4 {
	font-size: 10pt;
	font-weight: bold;
	color: #CC3300;
}
-->
</style>
	</head>
	<body>
		<center>
			<table width="766" border="0" align="center" cellpadding="0"
				cellspacing="0">
				<tr>
					<td align="center">
						<table width="766" border="0" align="center" cellpadding="0"
							cellspacing="0" bordercolor="#990033">
							<tr>
								<td>
									<img name="TOP_r5_c1" src="../images/TOP_r5_c1.jpg" width="25"
										height="58" border="0" id="TOP_r5_c1" alt="" />
								</td>
								<td background="../images/menu_xia_bg.jpg">
									<table width="100%" height="58" border="0" cellspacing="0"
										cellpadding="0">
										<tr>
											<td width="691">
												<table width="100%" border="0" cellspacing="0"
													cellpadding="0">
													<tr>
														<td colspan="2" height="3"></td>
													</tr>
													<tr>
														<td width="90%">
															<div align="center">
																<a class="MenuXia" href="../">&nbsp;首页&nbsp;</a>|
																<a class="MenuXia" href="/help/help.jsp?sn=help_02"
																	target="_blank">我的页面</a> |
																<a class="MenuXia" href="/help/help.jsp?sn=help_03"
																	target="_blank">订餐搜索</a> |
																<a class="MenuXia"
																	href="javascript:window.external.AddFavorite('http://www.51dinner.com','51Dinner网'); ">收藏本站</a>
															</div>
														</td>
														<td width="10%">
															&nbsp;
														</td>
													</tr>
												</table>
											</td>
										</tr>
										<tr>
											<td>
												<script language=JavaScript>
	 function search(){
		location.assign("product/Prolist.jsp?key=----"+document.getElementById("searchtext").value+"-"
		                 +(document.getElementById ("searchsel").selectedIndex==0?"0-":"-0")+"----");
	 }
	</script>
												<form name="top001"
													onsubmit="javascript:search();return false;">
													<table class="shousuo" width="100%" border="0"
														cellspacing="0" cellpadding="0">
														<tr>
															<td width="5%"></td>
															<td width="15%">
																<div align="left">
																	搜索类型：
																</div>
															</td>
															<td width="30%">
																<select name="searchsel" id="searchsel">
																	<option value="0">
																		搜索所有商品
																	</option>
																	<option value="1">
																		搜索所有卖家
																	</option>
																</select>
															</td>
															<td width="25%">
																<input name="searchtext" id="searchtext" type="text"
																	size="15" />
															</td>
															<td width="1%">
																&nbsp;
															</td>
															<td width="7%">
																<input class="SousAn" type="button" onclick="search();"
																	value="搜 索" height="150" />
															</td>
															<td>
																&nbsp;
															</td>
														</tr>
													</table>
												</form>
											</td>
										</tr>
									</table>
								</td>
								<td align="right">
									<img src="../images/TOP_r5_c5.jpg" width="267" height="58" />
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td align="center">
						<table width="600" align="center" border="0" cellspacing="4"
							cellpadding="0">
							<tr>
								<td align="left">
									你的位置：
									<a href="../" class="MenuT" target="_top">首页</a> >> 卖家页面 >>
									交易结束
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			<table width="766" cellspacing="0" cellpadding="0" border="0"
				align="center">
				<tr>
					<td align="left" valign="top">
						<table cellspacing="0" cellpadding="0" border="0" width="189">
							<tbody>
								<tr>
									<td height="13">
										<img height="25" width="189" alt="用户帐户"
											src="../images/left_myaccount.jpg" />
									</td>
								</tr>
								<tr>
									<td background="../images/left_bg01.jpg" align="center"
										valign="top">
										<table cellspacing="0" cellpadding="0" border="0" width="100%">
											<tbody>
												<tr>
													<td width="40%">
														<div align="right">
															<img height="10" width="1"
																src="../images/kongxi_h16px.gif" />
														</div>
													</td>
													<td width="60%" colspan="2"></td>
												</tr>
												<tr>
													<td height="25" align="right">
														欢 迎：
													</td>
													<td align="center" colspan="2"><%=name%></td>
												</tr>
												<tr>
													<td height="25" align="center" colspan="3">
														<a class="TiShi" href="activeOrderQuery.do">查 看 新 订 单</a>
													</td>
												</tr>
												<tr>
													<td height="25" align="center" colspan="3">
														<a class="TiShi" href="completedOrderQuery.do">查 看 旧 订
															单</a>
													</td>
												</tr>
											</tbody>
										</table>
										<table cellspacing="0" cellpadding="0" border="0" width="100%">
											<tbody>
												<tr>
													<td align="center" valign="middle" colspan="2">
														<a class="TiShi" href="/account/GetPwd.jsp">修改资料</a>
													</td>
													<td align="center" valign="top">
														<form action="/51Dinner/logout.do" method="post">
															<input type="image" name="Submit"
																src="../images/logout.jpg" />
														</form>
													</td>
												</tr>
												<tr>
													<td height="15" align="right" width="20%" valign="middle"></td>
													<td align="center" width="40%" valign="middle">
														<img height="10" width="1"
															src="../images/kongxi_h16px.gif" />
													</td>
													<td align="center" width="40%" valign="top"></td>
												</tr>
											</tbody>
										</table>
									</td>
								</tr>
								<tr>
									<td height="5">
										<img height="12" width="189" src="../images/left_bg02.gif" />
									</td>
								</tr>
							</tbody>
						</table>
						<table cellspacing="0" cellpadding="0" border="0" width="189">
							<tbody>
								<tr>
									<td height="13">
										<img height="25" width="189" src="../images/left_spfl.jpg" />
									</td>
								</tr>
								<tr>
									<td background="../images/left_bg01.jpg" align="center"
										valign="top">
										<table cellspacing="0" cellpadding="0" border="0" width="185">
											<tbody>
												<%=message1%>
											</tbody>
										</table>
									</td>
								</tr>
								<tr>
									<td height="5">
										<img height="12" width="189" src="../images/left_bg02.gif" />
									</td>
								</tr>
							</tbody>
						</table>
					</td>
					<td valign="top">
						<table width="563" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" valign="top">
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td height="25" align="left"
												background="../images/mid_bg_blue.gif">
												<marquee class="myColor">
												新版网站试运行,欢迎大家进行测评
												</marquee>
											</td>
										</tr>
										<tr>
											<td height="10">
												<img src="../images/mid_bg_botad.gif" width="563"
													height="10" />
											</td>
										</tr>
									</table>
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td height="24" valign="middle">
												<div align="center">
													<table width="99.6%" height="24" border="0" cellpadding="0"
														cellspacing="0" bgcolor="#e1f2ff"
														style="border: 1px solid #e0e0e0"
														background="../images/bg_blue_biaoti.gif">
														<tr>
															<td width="5%" align="center" valign="middle">
																<img src="../images/bttubiao.jpg" width="11" height="11" />
															</td>
															<td width="20%" align="left" valign="middle">
																<strong
																	style="font-size: 14px; color: #FF5500; letter-spacing: 1px">完成订单</strong>
															</td>
															<td valign="middle">

															</td>
														</tr>
													</table>
												</div>
											</td>
										</tr>
										<tr>
											<td background="../images/mid_bg_line.gif" valign="top">
												<table valign="top" width="99%" border="0" cellspacing="0"
													cellpadding="0">
													<tr class="DingDan">
														<td height="30" width="30"
															background="../images/hy_jjdd.gif"></td>
														<td width="130" align="center"
															background="../images/hy_jjdd.gif">
															<b>菜谱名称</b>
														</td>
														<td width="100" align="center"
															background="../images/hy_jjdd.gif">
															<b>订餐数量</b>
														</td>
														<td width="130" align="center"
															background="../images/hy_jjdd.gif">
															<b>订餐总价</b>
														</td>
														<td align="center" background="../images/hy_jjdd.gif">
															<b>可选操作</b>
														</td>
														<td width="30" background="../images/hy_jjdd.gif"></td>
													</tr>
													<%=message2%>
													<tr>
														<td colspan="6">
															<hr />
														</td>
													</tr>
													<tr>
														<td align="right" colspan="6">
															<%
																PageHelper p = (PageHelper) request.getAttribute("pageInfo");
																if (p == null)
																	p = new PageHelper();
																String pageShow = "";
																pageShow += "<a href=\"" + p.getAdditionPath()
																		+ "pageNum=1\">首页</a> ";
																for (int i1 = p.getCurrentPage() - 4; i1 <= p.getCurrentPage() + 4; i1++) {
																	if (i1 > 0 && i1 <= p.getTotalPage()) {
																		if (i1 != p.getCurrentPage())
																			pageShow += "<a href=\"" + p.getAdditionPath()
																					+ "pageNum=" + i1 + "\">" + i1 + "</a> ";
																		else
																			pageShow += p.getCurrentPage() + " ";
																	}
																}
																pageShow += "<a href=\"" + p.getAdditionPath() + "pageNum="
																		+ p.getTotalPage() + "\">尾页</a> ";
															%>
															<%=pageShow%>
														</td>
													</tr>
												</table>
											</td>
										</tr>
										<tr>
											<td height="18">
												<img src="../images/mid_bg_bot.gif" width="563" height="18" />
											</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			<table cellpadding="0" cellspacing="0" align="center">
				<tr>
					<td>
						Copyright(C)2007-2008 51Dinner
					</td>
				</tr>
			</table>
	</body>
	</center>
</html>
